import { createRouter, createWebHashHistory } from 'vue-router';

import Login from '@/views/Login.vue';
import Index from '@/views/Index.vue';

const routes = [
    { path: '/', component: Login },
    {
        path: '/index', component: Index
        , children: [
            {
                path: '',
                alias: '/welcome',
                component: () => import('@/components/Welcome.vue')
            },
            {
                path: '/user',
                component: () => import('@/components/User.vue')
            }
        ]
    }
];


const router = createRouter({
    routes,
    history: createWebHashHistory()
});

export default router;
